package com.meitianhui.convenitenbuy.main.contract;

import com.meitianhui.convenitenbuy.base.BasePresenter;
import com.meitianhui.convenitenbuy.base.BaseView;
import com.meitianhui.convenitenbuy.main.model.bean.AppToken;
import com.meitianhui.convenitenbuy.main.model.bean.HyphenateInfo;
import com.meitianhui.convenitenbuy.main.model.bean.UserToken;
import com.meitianhui.convenitenbuy.main.model.bean.VerifyPhone;
import com.meitianhui.convenitenbuy.module.mine.model.ConsumerInfo;
import com.meitianhui.convenitenbuy.module.mine.model.UserAsset;
import com.meitianhui.convenitenbuy.module.mine.model.UserInfo;

public interface LoginContract {
    interface View extends BaseView<Presenter> {

        void getAppTokenSuccess(AppToken appToken);

        void verifyPhoneSuccess(VerifyPhone verifyPhone);

        void phoneCodeMsgSuccess(String msg);

        void phoneCodeSuccess(String msg);

        void phoneCodeFailed(String msg);

        void loginSuccess(UserToken userToken);

        void getUserInfoSuccess(UserInfo userInfo);

        void getConsumerInfoSuccess(ConsumerInfo consumerInfo);

        void getUserAssetSuccess(UserAsset userAsset);

        void getHyphenateSuccess(HyphenateInfo hyphenateInfo);

        void postPushInfoSuccess();

        void onFail(int code,String msg);

        void loginFail(String msg);
    }

    interface Presenter extends BasePresenter {

        void getAppToken();

        void verifyPhone(String phone);

        void getPhoneCodeMsg();

        void getPhoneCode(String phone, String code, String imageCode);

        void login(String phone, String code);

        void getUserInfo();

        void getConsumerInfo();

        void getUserAsset();

        void getHyphenateInfo(String nickName,String headPicPath);

        void loginHyphenate(String imUserId);

        void postPushInfo();
    }

}
